import React, { Component } from 'react'
import { Layout, Breadcrumb } from 'antd';
import { HashRouter, Switch, Route, Redirect, Link, withRouter } from 'react-router-dom';
import Loadabel from 'react-loadable';
// import Addadmin from '../admin/Addadmin';
// import Changeadmin from '../admin/Changeadmin';


const { Content } = Layout;
const Index = Loadabel({
    loader: () => import('./index'),
    loading: () => <div>加载中</div>
});
const Adminlist =Loadabel({
    loader:()=>import ('../admin/Adminlist.js'),
    loading:()=> <div>adminlist加载中</div>,
});
const AddAdmin =Loadabel({
    loader:()=>import ('../admin/AddAdmin.js'),
    loading:()=> <div>加载中</div>,
});
const Changeadmin =Loadabel({
    loader:()=>import ('../admin/Changeadmin.js'),
    loading:()=> <div>加载中</div>,
});
const Testupload =Loadabel({
    loader:()=>import ('../admin/Testupload.js'),
    loading:()=> <div>加载中</div>,
});
const  LesseeList = Loadabel({
    loader: () => import('../../pages/lessee/LesseeList'),
    loading: () => <div>加载中</div>
});


const Remarks = Loadabel({
    loader: ()=>import('./Remarks'),
    loading: ()=><div>加载中</div>
})

class Mycontent extends Component {

  
 
    render() {

        return (
            <Layout style={{ padding: '0 24px 24px' }}>
                <Breadcrumb style={{ margin: '16px 0' }}>
                    <Breadcrumb.Item>Home</Breadcrumb.Item>
              <Breadcrumb.Item>List</Breadcrumb.Item>
              <Breadcrumb.Item>App</Breadcrumb.Item>
                
                </Breadcrumb>
                <Content
                    className="site-layout-background"
                    style={{
                        padding: 24,
                        margin: 0,
                        minHeight: 280,
                    }}
                >
                    <HashRouter>
                        <Switch>
                            <Redirect exact from='/home' to='/home/Index' />
                            <Route path='/home/Index' component={Index} />
                            <Route path='/home/adminlist' component={Adminlist} />
                            <Route path='/home/addadmin' component={AddAdmin} />
                            <Route path='/home/changeadmin' component={Changeadmin} />
                            <Route path='/home/testupload' component={Testupload}></Route>
                            <Route path='/home/lesseeList' component={LesseeList} />
                             
                            <Route path="/home/Remarks" component={Remarks}></Route>
                        </Switch>
                    </HashRouter>
                </Content>
            </Layout>
        )
    }
}

export default withRouter(Mycontent);
